home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / standard / disassembler.z / disassembler
Encoding:
Text File  |  2002-10-03  |  3.3 KB  |  70 lines

  1. DISASSEMBLER(3X)                                       Last changed: 2-2-99
  2.  
  3.  
  4. NNAAMMEE
  5.      ddiissaasssseemmbblleerr - Disassembles a MIPS instruction and prints the results
  6.  
  7. SSYYNNOOPPSSIISS
  8.      iinntt ddiissaasssseemmbblleerr ((_i_a_d_r, _r_e_g_s_t_y_l_e, _g_e_t__s_y_m_n_a_m_e, _g_e_t__r_e_g_v_a_l_u_e,,
  9.         _g_e_t__b_y_t_e_s, _p_r_i_n_t__h_e_a_d_e_r)
  10.      uunnssiiggnneedd _i_a_d_r;
  11.      iinntt _r_e_g_s_t_y_l_e;
  12.      cchhaarr **((**_g_e_t__s_y_m_n_a_m_e)();
  13.      iinntt ((**_g_e_t__r_e_g_v_a_l_u_e)();
  14.      lloonngg ((**_g_e_t__b_y_t_e_s)();
  15.      vvooiidd ((**_p_r_i_n_t__h_e_a_d_e_r)();
  16.  
  17. IIMMPPLLEEMMEENNTTAATTIIOONN
  18.      IRIX systems (o32 ABI only)
  19.  
  20. DDEESSCCRRIIPPTTIIOONN
  21.      ddiissaasssseemmbblleerr disassembles and prints a MIPS machine instruction on
  22.      ssttddoouutt. It accepts the following arguments:
  23.  
  24.      _i_a_d_r      Specifies the instruction address to be disassembled.
  25.  
  26.      _r_e_g_s_t_y_l_e  Specifies how registers are named in the disassembly; if the
  27.                value is 0, compiler names are used; otherwise, hardware
  28.                names are used.
  29.  
  30.      The next arguments are function pointers, most of which give the
  31.      caller some flexibility in the appearance of the disassembly.  The
  32.      only function that must be provided is _g_e_t__b_y_t_e_s.  All other functions
  33.      are optional.
  34.  
  35.      _g_e_t__b_y_t_e_s
  36.           This function is called with no arguments and returns the next
  37.           byte(s) to disassemble.
  38.  
  39.      _g_e_t__s_y_m_n_a_m_e
  40.           This function is passed an address, which is the target of a _j_a_l
  41.           instruction.  If NULL is returned or if _g_e_t__s_y_m_n_a_m_e is NULL, the
  42.           ddiissaasssseemmbblleerr prints the address; otherwise, the string name is
  43.           printed as returned from _g_e_t__s_y_m_n_a_m_e.
  44.  
  45.      _g_e_t__r_e_g_v_a_l_u_e
  46.           If _g_e_t__r_e_g_v_a_l_u_e is not NULL, it is passed a register number and
  47.           returns the current contents of the specified register.
  48.           ddiissaasssseemmbblleerr prints this information along with the instruction
  49.           disassembly.
  50.  
  51.      _p_r_i_n_t__h_e_a_d_e_r
  52.           If _p_r_i_n_t__h_e_a_d_e_r is not NULL, it is passed the instruction address
  53.           _i_a_d_r and the current instruction to be disassembled, which is the
  54.           return value from _g_e_t__b_y_t_e_s.  _p_r_i_n_t__h_e_a_d_e_r can use these
  55.           parameters to print any desired information before the actual
  56.           instruction disassembly is printed.
  57.  
  58.      If _g_e_t__b_y_t_e_s is NULL, the ddiissaasssseemmbblleerr returns -1 and errno is set to
  59.      EEIINNVVAALL; otherwise, the number of bytes that were disassembled is
  60.      returned.  If the disassembled word is a jump or branch instruction,
  61.      the instruction in the delay slot is also disassembled.
  62.  
  63.      The program must be loaded with the object file access routine library
  64.      lliibbeellffuuttiill..aa.
  65.  
  66. SSEEEE AALLSSOO
  67.      llddffccnn(4)
  68.  
  69.      This man page is available only online.
  70.